package com.sixth.controller;

import com.sixth.service.RoleUserService;
import com.sixth.service.UserService;
import com.sixth.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: carrent
 * @description:
 * @author: 高振杨
 * @create: 2022-01-13 18:20
 **/
@RestController
@RequestMapping("roleuser")
public class RoleUserController {

    @Autowired
    private RoleUserService roleUserService;

    //角色分配
    @RequestMapping("/updaterole")
    public CommonResult updaterole(String allrole,Integer userid){

        System.out.println(allrole+userid);

        CommonResult addUser = roleUserService.updaterole(allrole,userid);
        return addUser;
    }
}
